import Vue from 'vue'
import Router from 'vue-router'
import index from '@/components/App.vue'

// 图册
import image from '@/pages/images/list.vue'

// 文章
import articleList from '@/pages/article/list.vue'
import articleDetail from '@/pages/article/detail.vue'

import problemList from '@/pages/problem/list.vue'

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/',
      name: 'index',
      component: index,
      redirect: '/article/list',
      children: [
        {
          path: 'image',
          name: 'image',
          component: image,
          meta: {
            name: '图册'
          }
        },
        {
          path: 'article/list',
          name: 'article/list',
          component: articleList,
          meta: {
            name: '文章列表'
          }
        },
        {
          path: 'article/detail',
          name: 'article/detail',
          component: articleDetail,
          meta: {
            name: '文章详情'
          }
        },
        {
          path: 'problem/list',
          component: problemList,
          name: 'problem/list',
          meta: {
            name: '问题收集'
          }
        }
      ]
    }
  ]
})
